import { RouteRecordRaw } from "vue-router";
import { Welcom1 } from "../components/Welcom/Welcom1";
import { Welcom2 } from "../components/Welcom/Welcom2";
import { Welcom3 } from "../components/Welcom/Welcom3";
import { Welcom4 } from "../components/Welcom/Welcom4";
import { Wel1foot } from '../components/Welcom/Wel1foot';
import { Wel2foot } from '../components/Welcom/Wel2foot'
import { Wel3foot } from '../components/Welcom/Wel3foot'
import { Wel4foot } from '../components/Welcom/Wel4foot'
import { Welcom } from "../views/Welcom";
import { StartPage } from "../views/StartPage";
import { ItemCreate } from "../components/Item/ItemCreate";
import { ItemList } from "../components/Item/ItemList";
import { Itempage } from "../views/Itempage";
import { TagCreate } from "../components/tag/TagCreate";
import { TagEdit } from "../components/tag/TagEdit";
import { TagPage } from "../views/TagPage";
import { SignInPage } from "../views/SignInPage";
import { StatisticsPage } from "../views/StatisticsPage ";
export const routes: RouteRecordRaw[] = [
    {
        path: '/welcom', component: Welcom,
        children: [
            { path: '', redirect: "/welcom/1" },
            { path: '1', name: "Welcom1", components: { main: Welcom1, footer: Wel1foot, }, },  //, footer: FristAction
            { path: '2', name: "Welcom2", components: { main: Welcom2, footer: Wel2foot, }, },
            { path: '3', name: "Welcom3", components: { main: Welcom3, footer: Wel3foot, }, },
            { path: '4', name: "Welcom4", components: { main: Welcom4, footer: Wel4foot, }, }
        ]
    },

    { path: "/start", component: StartPage },
    {
        path: "/items", component: Itempage, //主路由
        children: [ //子路由
            { path: "", component: ItemList },
            { path: "create", component: ItemCreate },
        ]

    },
    {
        path: "/tags", component: TagPage,
        children: [
            { path: "create", component: TagCreate },
            { path: "edit", component: TagEdit },
        ]
    },
    { path: "/sign", component: SignInPage },
    { path: "/statistics", component: StatisticsPage },
]